package yiminsu.com.cn.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import yiminsu.com.cn.beans.Homestay;
import yiminsu.com.cn.beans.HomestayImage;
import yiminsu.com.cn.beans.Homestayold;


@Mapper
public interface HomestayMapper {
	/**
	 * 获取主表民宿
	 * @param hotelTitle
	 * @return
	 */
	Homestayold GetHomestayold(String hotelTitle);
	
	/**
	 * 获取主表民宿
	 * @param hotelId
	 * @return
	 */
	Homestayold GetHomestayoldid(Integer hotelId);
	/**
	 * 获取民宿副表
	 * @param hotelsketchid
	 * @return
	 */
	Homestay GetHomestay(Integer hotelsketchid);
	/**
	 * 获取民宿中间表
	 * @param qid
	 * @return
	 */
	List<HomestayImage> GetHomestayImage(String qid);
	
	/**
	 * 获取民宿主id
	 * @param registerPhoneNum
	 * @return
	 */
	Integer GetHostid(String registerPhoneNum);
	/**
	 * 获取地区id
	 * @param findAddressName
	 * @return
	 */
	Integer Getfindaddressid(String findAddressName);
	/**
	 * 主表添加新民宿
	 * @param homestayold
	 * @return
	 */
	Integer AddHomestayold(Homestayold homestayold);
		
	/**
	 * 副表添加新民宿
	 * @param homestay
	 * @return
	 */
	Integer AddHomestay(Homestay homestay);
	/**
	 * 添加民宿中间表
	 * @param homestayImage
	 * @return
	 */
	Integer AddHomestayImage(HomestayImage homestayImage);
	/**
	 * 删除民宿
	 * @param hotelId
	 * @return
	 */
	Integer DeleteHomestay(Integer hotelId);
}
